import asyncio


async def run():
    print('run函数')


# 创建协程对象
coroutine = run()
# 创建任务
task = asyncio.ensure_future(coroutine)
# 创建事件循环
loop = asyncio.get_event_loop()
# 将任务放到事件循环中
loop.run_until_complete(task)
